package com.diandian.backend.dingding.data.mapper;

import com.diandian.backend.dingding.data.domain.DingdingDeptTreeStaff;
import com.diandian.backend.dingding.data.dto.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DingdingDeptTreeStaffMapper {

    // 查询记录数
    Integer getCount(@Param("data") DingdingDeptTreeStaffPageParamDTO requestDTO);

    // 查询分页中的数据集合
    List<DingdingDeptTreeStaff> getPage(@Param("data") DingdingDeptTreeStaffPageParamDTO requestDTO, @Param("pageSize") Integer pageSize, @Param("offset") Integer offset);

    // 查询详情
    DingdingDeptTreeStaff getDetail(@Param("data") DingdingDeptTreeStaffDetailParamDTO requestDTO);

    // 根据数据id更新记录
    void updateById(@Param("data") DingdingDeptTreeStaffUpdateByIdParamDTO param);

    // 根据数据id删除记录
    void deleteById(@Param("data") DingdingDeptTreeStaffDeleteByIdParamDTO param);

    void deleteByBelongAndUserIdIn(@Param("belong") String belong, @Param("userIdList") List<String> userIdList);

    // 新增
    void add(@Param("data") DingdingDeptTreeStaffAddParamDTO param);

    void batchAdd(@Param("dataList")  List<DingdingDeptTreeStaffAddParamDTO> dataList);

    // 查询数据集合
    List<DingdingDeptTreeStaff> getList(@Param("data") DingdingDeptTreeStaffListParamDTO requestDTO);

}